package com.homeworkh.usermanagementserver.algorithm;
/**
 * @author lq
 * @date 2021/1/16 14:03
 */
public class PrintBinary {
    public static void print(int num){
        for (int i=31;i>=0;i--){
            System.out.print((num & (1<<i))==0?"0":"1");
        }
        System.out.println();
    }
    public static void main(String[] args) {
        int num=4;
        print(num);

        int a = 1111222;
        print(a);
    }
}
